		<fieldset>
		<legend>Prodotti</legend>
		<div id="lovely-things-list"><div><input class="search" placeholder="ricerca" /></div>
	<?php
	
	$query_id = (isset($_GET[id]))? $_GET[id] : $_CFG[pos][default_category] ;
	$query_p = "SELECT * FROM `prodotti` WHERE IDcategoria = ".$query_id." AND `prezzo` > 0";
	if ($result = $mysqli->query($query_p)) {
	echo "<div class=\"list\">";
		/* fetch associative array */
		while ($row = $result->fetch_assoc()) {
			echo "\t".'<div class="box" id="pro-'.$row["IDprodotto"].'">
			<div id="prod-'.$row["IDprodotto"].'" class="prod"><span class="nomeprodotto">'.$row["prodotto"].'</span><br />'.$row["descrizione"].'<br />'.$row["prezzo"].'&euro;</div>
			<div id="proq-'.$row["IDprodotto"].'" class="proq"><img src="images/ajax-loader1.gif" alt="loading.." /></div>
			</div>'."\n";
			echo "\t\t".'<script type="text/javascript">
				$("#pro-'.$row["IDprodotto"].'")
					.mouseenter(function () {
						$("#prod-'.$row["IDprodotto"].'")
							.slideUp(200);
						$("#proq-'.$row["IDprodotto"].'")
							.load(\'ajax.php?case=prodotti_qta&id='.$row["IDprodotto"].'\')
							.slideDown(200);
					}).mouseleave(function(){
						$("#prod-'.$row["IDprodotto"].'")
							.slideDown(200);	
						$("#proq-'.$row["IDprodotto"].'")
							.slideUp(200);
					});
				$("#pro-'.$row["IDprodotto"].'")
					.click(function(){
						$("#cassa").load("ajax.php?case=pro&id='.$row["IDprodotto"].'")
					});
				</script>';
		}

		/* free result set */
		$result->free();
	}
	?>
	</div></div>
		</fieldset>
		    <!-- Start of List.js stuff [http://listjs.com/] -->
    <script src="script/list.min.js"></script>

    <script type="text/javascript">

        /*
        * LOVELY THINGS
        */

        var options = {
    	    valueNames: [ 'nomeprodotto' ]
        };

        var featureList = new List('lovely-things-list', options);

        $('#filter-games').click(function() {
            featureList.filter(function(item) {
                if (item.values().category == "Game") {
                    return true;
                } else {
                    return false;
                }
            });
            return false;
        });

        $('#filter-beverages').click(function() {
            featureList.filter(function(item) {
                if (item.values().category == "Beverage") {
                    return true;
                } else {
                    return false;
                }
            });
            return false;
        });
        $('#filter-none').click(function() {
            featureList.filter();
            return false;
        });
    </script>
    <!-- End of List.js stuff -->